package cn.edu.bit.lixin.blog.action;

import java.util.List;

import cn.edu.bit.lixin.blog.biz.BlogManager;
import cn.edu.bit.lixin.blog.entity.Blog;

import com.opensymphony.xwork2.ActionSupport;

public class TestAction extends ActionSupport {
	private BlogManager blogManager;

	public BlogManager getBlogManager() {
		return blogManager;
	}

	public void setBlogManager(BlogManager blogManager) {
		this.blogManager = blogManager;
	}
	
	public String test(){
		List<Blog> list = blogManager.getBlogs();
		for (int i = 0;i < list.size();i++){
			Blog blog = (Blog)list.get(i);
			System.out.println(blog.getBlogname() + "  " + blog.getContent() + "  " + blog.getId());
		}
		return SUCCESS;
	}
}
